package coolapk.cj.demo.service.person.impl;

import coolapk.cj.demo.domain.Person;
import coolapk.cj.demo.mapper.PersonMapper;
import coolapk.cj.demo.service.person.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: demo
 * @description: 参与人Service实现类
 * @author: SDH
 * @create: 2019-04-16 16:42
 **/
@Service("PersonService")
public class PersonServiceImpl implements PersonService {
	@Autowired
	PersonMapper personMapper;

	@Override
	public int deleteByPrimaryKey(Integer id) {
		return personMapper.deleteByPrimaryKey(id);
	}

	@Override
	public int insert(Person record) {
		return personMapper.insert(record);
	}

	@Override
	public int insertSelective(Person record) {
		return personMapper.insertSelective(record);
	}

	@Override
	public Person selectByPrimaryKey(Person person) {
		return personMapper.selectByPrimaryKey(person);
	}

	@Override
	public int updateByPrimaryKeySelective(Person record) {
		return personMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Person record) {
		return personMapper.updateByPrimaryKey(record);
	}

	@Override
	public List<Person> getAllPersonByGoodId(int id) {
		return personMapper.getAllPersonByGoodId(id);
	}
}
